<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<s:useActionBean beanclass="com.pa165.languageschoolpresentation.LectorActionBean" var="actionBean"/>
   <f:message key="Total"/> = ${actionBean.levelOfLanguageService.getByLector(actionBean.lectorDTO).size()}:
        <table class="zakladni">
            <tr>
                <th><f:message key="Number"/></th>
                <th><f:message key="Id"/></th>
                <th><f:message key="Language"/></th>
                <th><f:message key="Level"/></th>                
                <th></th>                
            </tr>            
             <c:forEach items="${actionBean.levelOfLanguageService.getByLector(actionBean.lectorDTO)}" var="levelOfLanguageDTO" varStatus="loop">
                <tr>
                    <td>${loop.index + 1}</td>
                    <td>${levelOfLanguageDTO.id}</td>                   
                    <td><f:message key="com.pa165.languageschoolpersistence.entities.LanguageSpoken.${levelOfLanguageDTO.languageSpoken}"/></td> 
                    <td><f:message key="com.pa165.languageschoolpersistence.entities.LanguageLevel.${levelOfLanguageDTO.level}"/></td>                   
                    <td><s:link beanclass="com.pa165.languageschoolpresentation.LectorActionBean" event="deleteLanguage"><s:param name="levelOfLanguageDTO.id" value="${levelOfLanguageDTO.id}"/><f:message key="Delete"/></s:link> </td>                    
                </tr>
            </c:forEach> 
        </table>
                <s:form beanclass="com.pa165.languageschoolpresentation.LectorActionBean" action="/lectors/addLanguage">
       <s:hidden name="lectorDTO.id"/>
            <fieldset><legend><f:message key="language.add"/></legend>
                <%@include file="levelOfLanguageForm.jsp"%>
            <s:submit name="addLanguage" class="btn"><f:message key="language.add"/></s:submit>
            </fieldset>
</s:form>
<s:link beanclass="com.pa165.languageschoolpresentation.LectorActionBean" event="all"><f:message key="Back"/></s:link> 